package com.hzdl.service;

import com.hzdl.bean.User;
import com.hzdl.dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * author:Administrator
 * date:2018\9\4 0004
 * description:
 */
@Service
public class UserService {
    @Autowired
    private UserDao userDao;
    public void regist(User user){
        userDao.addUser(user);
    }
    public User login(String name,String psw){
        User user = userDao.getUserByNameAndPsw(name,psw);
        return user;
    }
}
